package net.wwang.blog.dao;

import net.wwang.blog.pojo.bo.RefreshToken;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface RefreshTokenDao extends JpaRepository<RefreshToken,String>, JpaSpecificationExecutor<RefreshToken> {

    RefreshToken findRefreshTokenByTokenKey(String tokenKey);
    RefreshToken findRefreshTokenByUserId(String userId);
    int deleteAllByUserId(String userId);
    int deleteAllByTokenKey(String tokenKey);
}
